package main

import (
	"fmt"
	"github.com/sirupsen/logrus"
)

type MyHook struct{}

func (h *MyHook) Levels() []logrus.Level {
	return logrus.AllLevels
}

func (h *MyHook) Fire(entry *logrus.Entry) error {
	fmt.Printf("Hook triggered: %s\n", entry.Message)
	return nil
}

func main() {
	log := logrus.New()
	log.AddHook(&MyHook{})

	log.Info("This is an info message")
	log.Error("This is an error message")
}
